﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage/PageTemplate.Master" AutoEventWireup="true"
    Codebehind="ReliefInfoRemark.aspx.cs" Inherits="FrameWork.web.Module.ITMS.Service.ReliefInfo.ReliefInfoRemark"
    Title="无标题页" %>

<asp:Content ID="Content1" ContentPlaceHolderID="PageBody" runat="server">

    <script language="javascript" src="<%=Page.ResolveClientUrl("~/js/date/date.js")%>"
        charset="utf-8"></script>

    <script>
    function document.body.onkeypress()
    {
      if(event.keyCode==13 && event.srcElement.id=='')
      {
        event.keyCode=0;
        return;
      }
    }
    function Edit(ID)
    {
        if(ID.lastIndexOf('_')==-1)
        {
            return;
        }
        var frontID=ID.substring(0,ID.lastIndexOf('_')+1)+'lab';
        UID=document.getElementById(frontID+'UID').innerText;
      
       document.getElementById('<%=txtEditUID.ClientID %>').innerText=UID;
       document.getElementById('<%=btnEdit.ClientID %>').click();
//        USERNO=document.getElementById(frontID+'USERNO').innerText;
        
        
//        USERNAME=document.getElementById(frontID+'USERNAME').innerText;
//        RELIEFNO=document.getElementById(frontID+'RELIEFNO').innerText;
//        RELIEFDAT=document.getElementById(frontID+'RELIEFDAT').innerText;
//        FILLINDAT=document.getElementById(frontID+'FILLINDAT').innerText;
//        CONTENT=document.getElementById(frontID+'CONTENT').innerText;
//        // alert(RELIEFNO);
//        fileValue(UID,USERNO,USERNAME,RELIEFNO,RELIEFDAT,FILLINDAT,CONTENT)
//        showTabEdit();
//        window.scrollTo(0,1000);
    }
    //显示TABLE
    function showTabEdit()
    {
        document.getElementById('tabEdit').style.display='';
    }
    //隐藏TABLE
    function hideTabEdit()
    {
        document.getElementById('tabEdit').style.display='none';
    }
    //填充值
    function fileValue(UID,USERNO,USERNAME,RELIEFNO,RELIEFDAT,FILLINDAT,CONTENT)
    {
        document.getElementById('<%=txtEditUID.ClientID %>').value=UID;
        document.getElementById('<%=labEditUSERNO.ClientID %>').innerText=USERNO;
        document.getElementById('<%=labEditUSERNAME.ClientID %>').innerText=USERNAME; 
        document.getElementById('<%=rdbEditRELIEFNO.ClientID %>'+'_'+RELIEFNO).check=true;
        document.getElementById('<%=txtEditRELIEFDAT.ClientID %>').value=RELIEFDAT;
        document.getElementById('<%=labEditFILLINDAT.ClientID %>').innerText=FILLINDAT;
        document.getElementById('<%=txtEditCONTENT.ClientID %>').value=CONTENT;

    }
  
    </script>

    <FrameWorkWebControls:HeadMenuWebControls ID="HeadMenuWebControls1" runat="server"
        HeadOPTxt="交接班日志批注" HeadTitleTxt="交接班日志批注">
    </FrameWorkWebControls:HeadMenuWebControls>
    <FrameWorkWebControls:TabOptionWebControls ID="TabOptionWebControls1" runat="server">
        <FrameWorkWebControls:TabOptionItem ID="TabOptionItem1" runat="server" Tab_Name="交接班日志">
            <asp:GridView ID="GVReliefInfo" runat="server" AutoGenerateColumns="False" Width="100%" OnRowDataBound="GVReliefInfo_RowDataBound">
                <Columns>
                    <asp:TemplateField HeaderText="员工编号">
                        <EditItemTemplate>
                            <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("USERNO") %>'></asp:TextBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:HyperLink ID="labUSERNO" runat="server" NavigateUrl="#" Style="position: relative; left: 0px;"  Text='<%# Bind("USERNO") %>' onclick="Edit(id)"></asp:HyperLink>
                           
                            <asp:Label ID="labUID" runat="server" Text='<%# Bind("UID") %>' Style="
                                display: none; left: 0px; position: relative;"></asp:Label>
                        </ItemTemplate>
                        <ItemStyle Width="10%" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="姓名">
                        <EditItemTemplate>
                            <asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("USERNAME") %>'></asp:TextBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                           
                            <asp:HyperLink ID="labUSERNAME" runat="server" NavigateUrl="#" Style="position: relative" Text='<%# Bind("USERNAME") %>' onclick="Edit(id)"></asp:HyperLink>
                        </ItemTemplate>
                        <ItemStyle Width="10%" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="班次">
                        <EditItemTemplate>
                            <asp:TextBox ID="TextBox4" runat="server" Text='<%# Bind("RELIEFNOName") %>'></asp:TextBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="labRELIEFNOName" runat="server" Text='<%# Bind("RELIEFNOName") %>'></asp:Label>
                            <asp:Label ID="labRELIEFNO" runat="server" Text='<%# Bind("RELIEFNO") %>' Style="display: none"></asp:Label>
                        </ItemTemplate>
                        <ItemStyle Width="6%" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="交班时间">
                        <EditItemTemplate>
                            <asp:TextBox ID="TextBox5" runat="server" Text='<%# Bind("RELIEFDAT") %>'></asp:TextBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="labRELIEFDAT" runat="server" Text='<%# Bind("RELIEFDAT", "{0:yyyy-MM-dd}") %>'></asp:Label>
                        </ItemTemplate>
                        <ItemStyle Width="12%" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="填写日期">
                        <EditItemTemplate>
                            <asp:TextBox ID="TextBox6" runat="server" Text='<%# Bind("FILLINDAT") %>'></asp:TextBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="labFILLINDAT" runat="server" Text='<%# Bind("FILLINDAT", "{0:yyyy-MM-dd}") %>'></asp:Label>
                        </ItemTemplate>
                        <ItemStyle Width="12%" />
                    </asp:TemplateField>
                     <asp:TemplateField HeaderText="重要信息" Visible=false>
                      
                        <ItemTemplate>
                            <asp:Label ID="labImport" runat="server" Text='<%# Bind("Import") %>'></asp:Label>
                        </ItemTemplate>
                        <ItemStyle Width="12%" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="内容">
                        <EditItemTemplate>
                            <asp:TextBox ID="TextBox7" runat="server" Text='<%# Bind("CONTENT") %>'></asp:TextBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="labCONTENT" runat="server" Text='<%# Bind("CONTENT") %>' ></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                     <asp:TemplateField HeaderText="批注">
                      
                        <ItemTemplate>
                            <asp:Label ID="labTemp1" runat="server" Text='<%# Bind("Temp1") %>' ></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
            <FrameWorkWebControls:AspNetPager ID="PUReliefInfo" runat="server" OnPageChanged="PUReliefInfo_PageChanged">
            </FrameWorkWebControls:AspNetPager>
            <table width="100%" border="0" cellspacing="1" cellpadding="3" align="left" id='tabEdit'
                style="display: none">
                <tr>
                    <td style="height: 25px"></td>
                </tr>
                <tr class="table_body table_body_NoWidth">
                    <td style="height: 25px">
                        <asp:Label ID="Label1" runat="server" Font-Bold="True" Font-Size="X-Small" Text="详细信息"></asp:Label></td>
                </tr>
                <tr>
                    <td class="table_body table_body_NoWidth">
                        员工编号</td>
                    <td class="table_none table_none_NoWidth">
                        <asp:Label ID="labEditUSERNO" runat="server"></asp:Label>
                    </td>
                    <td class="table_body table_body_NoWidth">
                        姓名</td>
                    <td class="table_none table_none_NoWidth">
                        <asp:Label ID="labEditUSERNAME" runat="server"></asp:Label></td>
                </tr>
                <tr>
                    <td class="table_body table_body_NoWidth">
                        班次</td>
                    <td class="table_none table_none_NoWidth">
                        <asp:RadioButtonList ID="rdbEditRELIEFNO" runat="server" RepeatDirection="Horizontal" Enabled="False" Visible="False">
                            <asp:ListItem Value="0" Selected="True">日班</asp:ListItem>
                            <asp:ListItem Value="1">夜班</asp:ListItem>
                            <asp:ListItem Value="2">24小时班</asp:ListItem>
                        </asp:RadioButtonList>
                        <asp:Label ID="labEditRELIEFNO" runat="server"></asp:Label></td>
                    <td class="table_body table_body_NoWidth">
                        交班时间</td>
                    <td class="table_none table_none_NoWidth">
                        <asp:TextBox ID="txtEditRELIEFDAT" 
                            Columns="10" runat="server" CssClass="text_input" ReadOnly="True"></asp:TextBox>
                        <asp:Label ID="labEditFILLINDAT" runat="server" Style="position: relative; display: none"></asp:Label></td>
                </tr>
                <tr>
                    <td class="table_body table_body_NoWidth">
                        重要信息</td>
                    <td class="table_none table_none_NoWidth">
                        <asp:CheckBox ID="cbEditImport" runat="server" Text="是" Enabled="False" Visible="False" />
                        <asp:Label ID="labEditImport" runat="server"></asp:Label></td>
                    <td class="table_body table_body_NoWidth">
                    </td>
                    <td class="table_none table_none_NoWidth">
                    </td>
                </tr>
                <tr>
                    <td class="table_body table_body_NoWidth" style="height: 142px">
                        内容</td>
                    <td class="table_none table_none_NoWidth" colspan="3" style="height: 142px">
                        <asp:TextBox ID="txtEditCONTENT" runat="server" Height="150px" Width="100%" TextMode="MultiLine" ReadOnly="True"></asp:TextBox></td>
                </tr>
                <tr>
                    <td class="table_body table_body_NoWidth" style="height: 142px">
                        批注</td>
                    <td class="table_none table_none_NoWidth" colspan="3" style="height: 142px">
                        <asp:TextBox ID="txtTemp1" runat="server" Height="150px" MaxLength="500" TextMode="MultiLine"
                            Width="100%"></asp:TextBox></td>
                </tr>
                <tr>
                    <td colspan="4" align="right">
                        <asp:Button ID="btnEditSave" runat="server" Text="保存" CssClass="button_bak" OnClick="btnEditSave_Click"
                            />
                        <input id="btnCancel"  type="button" value="取消" class="button_bak"
                            onclick="hideTabEdit()" />
                        &nbsp;   <asp:Button ID="btnEdit" runat="server" Style="display: none; position: relative;"
                Text="btnEdit" OnClick="btnEdit_Click" />
            <asp:TextBox ID="txtEditUID" runat="server" Style="position: relative; display: none; left: 0px;"
                Width="65px"></asp:TextBox>
                    </td>
                </tr>
            </table>
         </FrameWorkWebControls:TabOptionItem>
        <FrameWorkWebControls:TabOptionItem ID="TabOptionItem3" runat="server" Tab_Name="查询" Tab_Visible="False">
            <table width="100%" border="0" cellspacing="1" cellpadding="3" align="left">
                <tr>
                    <td class="table_body table_body_NoWidth">
                        员工编号</td>
                    <td class="table_none table_none_NoWidth">
                        <asp:TextBox ID="txtUSERNO" runat="server" CssClass="text_input"></asp:TextBox></td>
                    <td class="table_body table_body_NoWidth">
                        姓名</td>
                    <td class="table_none table_none_NoWidth" style="width: 337px">
                        <asp:TextBox ID="txtUSERNAME" runat="server" CssClass="text_input"></asp:TextBox></td>
                </tr>
                <tr>
                    <td class="table_body table_body_NoWidth" style="height: 46px">
                        班次</td>
                    <td class="table_none table_none_NoWidth" style="height: 46px">
                        <asp:RadioButtonList ID="rdbsRELIEFNO" runat="server" RepeatDirection="Horizontal">
                            <asp:ListItem Value="-1" Selected="True">所有</asp:ListItem>
                            <asp:ListItem Value="0">日班</asp:ListItem>
                            <asp:ListItem Value="1">夜班</asp:ListItem>
                            <asp:ListItem Value="2">24小时班</asp:ListItem>
                        </asp:RadioButtonList></td>
                    <td class="table_body table_body_NoWidth" style="height: 46px">
                        交班时间</td>
                    <td class="table_none table_none_NoWidth" style="height: 46px; width: 337px;">
                        <asp:TextBox ID="txtBegin" runat="server" Columns="10" CssClass="text_input" onfocus="javascript:HS_setDate(this);"
                            title="请输入交班时间~:date"></asp:TextBox>至<asp:TextBox ID="txtEnd" runat="server" Columns="10"
                                CssClass="text_input" onfocus="javascript:HS_setDate(this);" title="请输入交班时间~:date"></asp:TextBox></td>
                </tr>
                <tr>
                    <td class="table_body table_body_NoWidth" style="height: 46px">
                        重要信息</td>
                    <td class="table_none table_none_NoWidth" style="height: 46px">
                        <asp:DropDownList ID="dropImport" runat="server">
                            <asp:ListItem Value="-1">所有</asp:ListItem>
                            <asp:ListItem Value="1">是</asp:ListItem>
                            <asp:ListItem Value="0">否</asp:ListItem>
                        </asp:DropDownList></td>
                    <td class="table_body table_body_NoWidth" style="height: 46px">
                    </td>
                    <td class="table_none table_none_NoWidth" style="width: 337px; height: 46px">
                    </td>
                </tr>
                <tr>
                    <td colspan="4" align="right" style="height: 26px">
                        <asp:Button ID="btnSeach" runat="server" Text="查询" CssClass="button_bak" OnClick="btnSeach_Click" />
                    </td>
                </tr>
            </table>
        </FrameWorkWebControls:TabOptionItem>
        &nbsp;
    </FrameWorkWebControls:TabOptionWebControls>
</asp:Content>
